package foo;

import java.util.LinkedList;

public class ActiveObjectEngine
{
LinkedList itsCommand = new LinkedList();
public void addCommand(Command c)
{
itsCommand.add(c);
}
public void run()
{
while (!itsCommand.isEmpty())
{
Command c = (Command) itsCommand.getFirst();
itsCommand.removeFirst();
try{c.execute();}
catch(Exception e){}

}
}

}